/**
 * 推广管理
 */
import request from '@/utils/request'


//刘力旭  专题管理
export function listTopic(query) {
    return request({
      url: '/topic/list',
      method: 'get',
      params: query
    })
  }
  
  export function createTopic(data) {
    return request({
      url: '/topic/create',
      method: 'post',
      data
    })
  }
  
  export function readTopic(query) {
    return request({
      url: '/topic/read',
      method: 'get',
      params: query
    })
  }
  
  export function updateTopic(data) {
    return request({
      url: '/topic/update',
      method: 'post',
      data
    })
  }
  
  export function deleteTopic(data) {
    return request({
      url: '/topic/delete',
      method: 'post',
      data
    })
  }
//专题管理结束

//优惠券管理
export function listCoupon(query) {
  return request({
    url: '/coupon/list',
    method: 'get',
    params: query
  })
}

export function createCoupon(data) {
  return request({
    url: '/coupon/create',
    method: 'post',
    data
  })
}
export function listUser(query) {
  return request({
    url: '/coupon/listuser',
    method: 'get',
    params: query
  })
}
export function readCoupon(query) {
  return request({
    url: '/coupon/read',
    method: 'get',
    params: query
  })
}

export function updateCoupon(data) {
  return request({
    url: '/coupon/update',
    method: 'post',
    data
  })
}

export function deleteCoupon(data) {
  return request({
    url: '/coupon/delete',
    method: 'post',
    data
  })
}
//优惠券管理结束